package com.situ.boot.entity;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Date;
import java.util.Objects;
import com.situ.boot.entity.UserEntity;
import org.springframework.format.annotation.DateTimeFormat;

@Entity
@Table(name = "user", schema = "brcc")
public class UserEntity {
    private Integer uid;
    private String phone;
    private String name;
    private String password;
    private String tradePwd;
    private String bank;
    private String bankName;
    private String bankAccount;
    private Short freeze;
    private Integer superior;
    private Double diamond;
    private Double vouchers;
    private Double money;
    private Integer grade;
    private Double rechargeTotal;
    private Integer buyNumber;
    private Date rechargeTime;
    private Date registerTime;
    private Short generalAgent;
    private Double earningsProportion;
    private String address;
    private Integer display;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date guamaiTime;
    private Integer astrict;
    private String moneyAddress;
    private String twoCode;
    private Double freezeDiamond;
    private Double fmoney;
    private String isld;
    private Double moneybrtoal;
    private Integer curNumber;
    private Double freezeFmoney;
    private Double taxmoney;
    private Integer taxcenter;
    private String superiorName;
    private String superiorPhone;

    public String getSuperiorName() {
        return superiorName;
    }

    public void setSuperiorName(String superiorName) {
        this.superiorName = superiorName;
    }

    public String getSuperiorPhone() {
        return superiorPhone;
    }

    public void setSuperiorPhone(String superiorPhone) {
        this.superiorPhone = superiorPhone;
    }

    @Id
    @Column(name = "uid")
    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    @Basic
    @Column(name = "phone")
    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "password")
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Basic
    @Column(name = "trade_pwd")
    public String getTradePwd() {
        return tradePwd;
    }

    public void setTradePwd(String tradePwd) {
        this.tradePwd = tradePwd;
    }

    @Basic
    @Column(name = "bank")
    public String getBank() {
        return bank;
    }

    public void setBank(String bank) {
        this.bank = bank;
    }

    @Basic
    @Column(name = "bank_name")
    public String getBankName() {
        return bankName;
    }

    public void setBankName(String bankName) {
        this.bankName = bankName;
    }

    @Basic
    @Column(name = "bank_account")
    public String getBankAccount() {
        return bankAccount;
    }

    public void setBankAccount(String bankAccount) {
        this.bankAccount = bankAccount;
    }

    @Basic
    @Column(name = "freeze")
    public Short getFreeze() {
        return freeze;
    }

    public void setFreeze(Short freeze) {
        this.freeze = freeze;
    }

    @Basic
    @Column(name = "superior")
    public Integer getSuperior() {
        return superior;
    }

    public void setSuperior(Integer superior) {
        this.superior = superior;
    }

    @Basic
    @Column(name = "diamond")
    public Double getDiamond() {
        return diamond;
    }

    public void setDiamond(Double diamond) {
        this.diamond = diamond;
    }

    @Basic
    @Column(name = "vouchers")
    public Double getVouchers() {
        return vouchers;
    }

    public void setVouchers(Double vouchers) {
        this.vouchers = vouchers;
    }

    @Basic
    @Column(name = "money")
    public Double getMoney() {
        return money;
    }

    public void setMoney(Double money) {
        this.money = money;
    }

    @Basic
    @Column(name = "grade")
    public Integer getGrade() {
        return grade;
    }

    public void setGrade(Integer grade) {
        this.grade = grade;
    }

    @Basic
    @Column(name = "recharge_total")
    public Double getRechargeTotal() {
        return rechargeTotal;
    }

    public void setRechargeTotal(Double rechargeTotal) {
        this.rechargeTotal = rechargeTotal;
    }

    @Basic
    @Column(name = "buy_number")
    public Integer getBuyNumber() {
        return buyNumber;
    }

    public void setBuyNumber(Integer buyNumber) {
        this.buyNumber = buyNumber;
    }

    @Basic
    @Column(name = "recharge_time")
    public Date getRechargeTime() {
        return rechargeTime;
    }

    public void setRechargeTime(Date rechargeTime) {
        this.rechargeTime = rechargeTime;
    }

    @Basic
    @Column(name = "register_time")
    public Date getRegisterTime() {
        return registerTime;
    }

    public void setRegisterTime(Date registerTime) {
        this.registerTime = registerTime;
    }

    @Basic
    @Column(name = "general_agent")
    public Short getGeneralAgent() {
        return generalAgent;
    }

    public void setGeneralAgent(Short generalAgent) {
        this.generalAgent = generalAgent;
    }

    @Basic
    @Column(name = "earnings_proportion")
    public Double getEarningsProportion() {
        return earningsProportion;
    }

    public void setEarningsProportion(Double earningsProportion) {
        this.earningsProportion = earningsProportion;
    }

    @Basic
    @Column(name = "address")
    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    @Basic
    @Column(name = "display")
    public Integer getDisplay() {
        return display;
    }

    public void setDisplay(Integer display) {
        this.display = display;
    }

    @Basic
    @Column(name = "guamai_time")
    public Date getGuamaiTime() {
        return guamaiTime;
    }

    public void setGuamaiTime(Date guamaiTime) {
        this.guamaiTime = guamaiTime;
    }

    @Basic
    @Column(name = "astrict")
    public Integer getAstrict() {
        return astrict;
    }

    public void setAstrict(Integer astrict) {
        this.astrict = astrict;
    }

    @Basic
    @Column(name = "money_address")
    public String getMoneyAddress() {
        return moneyAddress;
    }

    public void setMoneyAddress(String moneyAddress) {
        this.moneyAddress = moneyAddress;
    }

    @Basic
    @Column(name = "two_code")
    public String getTwoCode() {
        return twoCode;
    }

    public void setTwoCode(String twoCode) {
        this.twoCode = twoCode;
    }

    @Basic
    @Column(name = "freeze_diamond")
    public Double getFreezeDiamond() {
        return freezeDiamond;
    }

    public void setFreezeDiamond(Double freezeDiamond) {
        this.freezeDiamond = freezeDiamond;
    }

    @Basic
    @Column(name = "fmoney")
    public Double getFmoney() {
        return fmoney;
    }

    public void setFmoney(Double fmoney) {
        this.fmoney = fmoney;
    }

    @Basic
    @Column(name = "isld")
    public String getIsld() {
        return isld;
    }

    public void setIsld(String isld) {
        this.isld = isld;
    }

    @Basic
    @Column(name = "moneybrtoal")
    public Double getMoneybrtoal() {
        return moneybrtoal;
    }

    public void setMoneybrtoal(Double moneybrtoal) {
        this.moneybrtoal = moneybrtoal;
    }

    @Basic
    @Column(name = "cur_number")
    public Integer getCurNumber() {
        return curNumber;
    }

    public void setCurNumber(Integer curNumber) {
        this.curNumber = curNumber;
    }

    @Basic
    @Column(name = "freeze_fmoney")
    public Double getFreezeFmoney() {
        return freezeFmoney;
    }

    public void setFreezeFmoney(Double freezeFmoney) {
        this.freezeFmoney = freezeFmoney;
    }

    @Basic
    @Column(name = "taxmoney")
    public Double getTaxmoney() {
        return taxmoney;
    }

    public void setTaxmoney(Double taxmoney) {
        this.taxmoney = taxmoney;
    }

    @Basic
    @Column(name = "taxcenter")
    public Integer getTaxcenter() {
        return taxcenter;
    }

    public void setTaxcenter(Integer taxcenter) {
        this.taxcenter = taxcenter;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        UserEntity that = (UserEntity) o;
        return uid == that.uid &&
                Objects.equals(phone, that.phone) &&
                Objects.equals(name, that.name) &&
                Objects.equals(password, that.password) &&
                Objects.equals(tradePwd, that.tradePwd) &&
                Objects.equals(bank, that.bank) &&
                Objects.equals(bankName, that.bankName) &&
                Objects.equals(bankAccount, that.bankAccount) &&
                Objects.equals(freeze, that.freeze) &&
                Objects.equals(superior, that.superior) &&
                Objects.equals(diamond, that.diamond) &&
                Objects.equals(vouchers, that.vouchers) &&
                Objects.equals(money, that.money) &&
                Objects.equals(grade, that.grade) &&
                Objects.equals(rechargeTotal, that.rechargeTotal) &&
                Objects.equals(buyNumber, that.buyNumber) &&
                Objects.equals(rechargeTime, that.rechargeTime) &&
                Objects.equals(registerTime, that.registerTime) &&
                Objects.equals(generalAgent, that.generalAgent) &&
                Objects.equals(earningsProportion, that.earningsProportion) &&
                Objects.equals(address, that.address) &&
                Objects.equals(display, that.display) &&
                Objects.equals(guamaiTime, that.guamaiTime) &&
                Objects.equals(astrict, that.astrict) &&
                Objects.equals(moneyAddress, that.moneyAddress) &&
                Objects.equals(twoCode, that.twoCode) &&
                Objects.equals(freezeDiamond, that.freezeDiamond) &&
                Objects.equals(fmoney, that.fmoney) &&
                Objects.equals(isld, that.isld) &&
                Objects.equals(moneybrtoal, that.moneybrtoal) &&
                Objects.equals(curNumber, that.curNumber) &&
                Objects.equals(freezeFmoney, that.freezeFmoney) &&
                Objects.equals(taxmoney, that.taxmoney) &&
                Objects.equals(taxcenter, that.taxcenter);
    }

    @Override
    public int hashCode() {
        return Objects.hash(uid, phone, name, password, tradePwd, bank, bankName, bankAccount, freeze, superior, diamond, vouchers, money, grade, rechargeTotal, buyNumber, rechargeTime, registerTime, generalAgent, earningsProportion, address, display, guamaiTime, astrict, moneyAddress, twoCode, freezeDiamond, fmoney, isld, moneybrtoal, curNumber, freezeFmoney, taxmoney, taxcenter);
    }

    @Override
    public String toString() {
        return "UserEntity{" +
                "uid=" + uid +
                ", phone='" + phone + '\'' +
                ", name='" + name + '\'' +
                ", password='" + password + '\'' +
                ", tradePwd='" + tradePwd + '\'' +
                ", bank='" + bank + '\'' +
                ", bankName='" + bankName + '\'' +
                ", bankAccount='" + bankAccount + '\'' +
                ", freeze=" + freeze +
                ", superior=" + superior +
                ", diamond=" + diamond +
                ", vouchers=" + vouchers +
                ", money=" + money +
                ", grade=" + grade +
                ", rechargeTotal=" + rechargeTotal +
                ", buyNumber=" + buyNumber +
                ", rechargeTime=" + rechargeTime +
                ", registerTime=" + registerTime +
                ", generalAgent=" + generalAgent +
                ", earningsProportion=" + earningsProportion +
                ", address='" + address + '\'' +
                ", display=" + display +
                ", guamaiTime=" + guamaiTime +
                ", astrict=" + astrict +
                ", moneyAddress='" + moneyAddress + '\'' +
                ", twoCode='" + twoCode + '\'' +
                ", freezeDiamond=" + freezeDiamond +
                ", fmoney=" + fmoney +
                ", isld='" + isld + '\'' +
                ", moneybrtoal=" + moneybrtoal +
                ", curNumber=" + curNumber +
                ", freezeFmoney=" + freezeFmoney +
                ", taxmoney=" + taxmoney +
                ", taxcenter=" + taxcenter +
                ", superiorName='" + superiorName + '\'' +
                ", superiorPhone=" + superiorPhone +
                '}';
    }
}
